package cn.xyz.mianshi.vo;

import org.bson.types.ObjectId;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;
import org.mongodb.morphia.annotations.Indexed;

//直播间
@Entity(value="LiveRoom",noClassnameStored=true)
public class LiveRoom {
	
	private @Id ObjectId roomId;
	
	@Indexed
	private Integer userId; //直播间创建者
	private String nickName;
	private String name;//直播间名称
	private String notice;//房间公告
	private String url;//直播间推流地址
	
	private Integer numbers=0;//直播间人数
	
	private long createTime=0;//创建时间


	public ObjectId getRoomId() {
		return roomId;
	}

	public void setRoomId(ObjectId roomId) {
		this.roomId = roomId;
	}
	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNotice() {
		return notice;
	}

	public void setNotice(String notice) {
		this.notice = notice;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getNumbers() {
		return numbers;
	}

	public void setNumbers(Integer numbers) {
		this.numbers = numbers;
	}

	public long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	//直播间的用户
	@Entity(value="LiveRoomMember",noClassnameStored=true)
	public static class LiveRoomMember {
		
		@Id
		private ObjectId id;
		@Indexed
		private ObjectId roomId;
		@Indexed
		private Integer userId;
		//private String name;
		private String nickName;
		
		private long createTime;//加入时间
		
		public ObjectId getId() {
			return id;
		}
		public void setId(ObjectId id) {
			this.id = id;
		}
		public ObjectId getRoomId() {
			return roomId;
		}
		public void setRoomId(ObjectId roomId) {
			this.roomId = roomId;
		}
		public Integer getUserId() {
			return userId;
		}
		public void setUserId(Integer userId) {
			this.userId = userId;
		}
		public String getNickName() {
			return nickName;
		}
		public void setNickName(String nickName) {
			this.nickName = nickName;
		}
		public long getCreateTime() {
			return createTime;
		}
		public void setCreateTime(long createTime) {
			this.createTime = createTime;
		}
		
		

	}
}
